


// banner
var swiper = new Swiper('.touroute_detail_img', {
	nextButton: '.swiper-button-next',
	prevButton: '.swiper-button-prev',
	paginationClickable: true,
	spaceBetween: 10,
	centeredSlides: true,
	autoplay: 3000,
	autoplayDisableOnInteraction: false
});


var height = $('.touroute_detail_tag').offset().top;
$(window).scroll(function(event) {
	
	var scrollTop = $(window).scrollTop();


		if (scrollTop >= height) {
			$('.touroute_detail_tag').addClass('addtouroute_detail_tag')
			$('.touroute_detail_con1').css('margin-top','120px')
		}else  {
			$('.touroute_detail_tag').removeClass('addtouroute_detail_tag')
			$('.touroute_detail_con1').css('margin-top','0px')

		}
});

$('.touroute_detail_tag li').click(function(event) {
	// document.getElementById('con'+$(this).index()).scrollIntoView()
	$('.touroute_detail_con').stop();
	$(this).addClass('curli').siblings().removeClass('curli')

	// $('.touroute_detail_con' + ($(this).index() + 1)).animate({scrollTop:'0px'}, 300)
	$('html,body').animate({scrollTop: $('.touroute_detail_con' + ($(this).index() + 1)).offset().top-$('.touroute_detail_tag').height()}, 400);


});